﻿using GalaSoft.MvvmLight.Command;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace TianYu
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = this;
        }

        public ICommand SelectPage => new RelayCommand(c =>
                                                    {
                                                        switch (c)
                                                        {
                                                            case "首页":
                                                                mainFrame.Source = new Uri($"Pages/Main/Home.xaml", UriKind.Relative);
                                                                break;
                                                            case "工作台":
                                                                mainFrame.Source = new Uri($"Pages/Work/Working.xaml", UriKind.Relative);
                                                                break;
                                                            case "数据挖掘":
                                                                mainFrame.Source = new Uri($"Pages/Data/DataMining.xaml", UriKind.Relative);
                                                                break;
                                                            case "更多":
                                                                mainFrame.Source = new Uri($"Pages/More/More.xaml", UriKind.Relative);
                                                                break;
                                                            default:
                                                                mainFrame.Source = new Uri($"Pages/Main/Home.xaml", UriKind.Relative);
                                                                break;
                                                        }
                                                    });

    }
}
